<script lang="ts">
import { defineComponent, PropType } from "vue";

interface SelectOption {
  label: string;
  value: object;
}

export default defineComponent({
  name: "MeiFormSelect",
  props: {
    label: String,
    options: Array as PropType<SelectOption[]>,
    value: {} as PropType<any>,
  },
});
</script>

<template>
  <el-form-item :label="label">
    <el-select :value="value" @input="$emit('input', $event)">
      <el-option
        v-for="option in options"
        :key="option.value"
        :label="option.label"
        :value="option.value"
      ></el-option>
    </el-select>
  </el-form-item>
</template>

<style scoped lang="scss"></style>
